% V20210224 - 8.8.1 GW_SET_PROGRESSBAR INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. title$ = GW_ADD_BAR_TITLE$("Progressbar Example") % Add title to page. GW_ADD_TITLEBAR(p, title$) % Add progressbar. progress = GW_ADD_PROGRESSBAR(p, ~ "This is an example of the progressbar control:") % Add button to get progressbar value. GW_ADD_BUTTON(p, "Get progress", "get") % Add text to show progressbar value. text = GW_ADD_TEXT(p, "0") % Add button to increment progressbar value. GW_ADD_BUTTON(p, "Increment progress", "inc") % Show page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Parse user action. SW.BEGIN r$ % "get" button was pressed. SW.CASE "get" s = GW_GET_VALUE(progress) GW_MODIFY(text,"text",INT$(s)) SW.BREAK % "inc" button was pressed SW.CASE "inc" s = GW_GET_VALUE(progress) + 1 GW_SET_PROGRESSBAR(progress, s) SW.BREAK SW.END % End when BACK key is pressed. UNTIL r$="BACK" END "End of Progressbar example."